import {Module} from '@nestjs/common';
import {AuthService} from './auth.service';
import {AuthController} from './auth.controller';
import {TypeOrmModule} from "@nestjs/typeorm";
import {User} from "../users/user.entity";
import {JwtModule} from "@nestjs/jwt";
import config from '../../config/index'
import {JwtStrategy} from "./jwt.strategy";

@Module({
    imports: [TypeOrmModule.forFeature([User]),
        JwtModule.register({
            secret:config.security.secretKey,
            signOptions: {expiresIn: '7d'},
        }),],
    providers: [AuthService,JwtStrategy],
    controllers: [AuthController]
})
export class AuthModule {
}
